---
page_title: "cloudflare_zone Data Source - Cloudflare"
subcategory: ""
description: |-
  Use this data source to look up zone https://api.cloudflare.com/#zone-properties
  info. This is the singular alternative to cloudflare_zones.
---

# cloudflare_zone (Data Source)

Use this data source to look up [zone](https://api.cloudflare.com/#zone-properties)
info. This is the singular alternative to `cloudflare_zones`.

~> **Note** Cloudflare zone names **are not unique**. It is possible for multiple
accounts to have the same zone created but in different states. If you are
using this setup, it is advised to use the `account_id` attribute on this
resource or swap to `cloudflare_zones` to further filter the results.

## Example Usage

```terraform
data "cloudflare_zone" "example" {
  name = "example.com"
}

resource "cloudflare_record" "example" {
  zone_id = data.cloudflare_zone.example.id
  name    = "www"
  value   = "203.0.113.1"
  type    = "A"
  proxied = true
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `account_id` (String) The account identifier to target for the resource.
- `name` (String) The name of the zone. Must provide only one of `zone_id`, `name`.
- `zone_id` (String) The zone identifier to target for the resource. Must provide only one of `zone_id`, `name`.

### Read-Only

- `id` (String) The ID of this resource.
- `name_servers` (List of String) Cloudflare assigned name servers. This is only populated for zones that use Cloudflare DNS.
- `paused` (Boolean) Whether the zone is paused on Cloudflare.
- `plan` (String) The name of the plan associated with the zone.
- `status` (String) Status of the zone.
- `vanity_name_servers` (List of String) List of Vanity Nameservers (if set).
